package br.com.news.factory;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import br.com.news.factory.interfaces.IFacturyDistribution;

public class NewsMain {

	private static final String SERVICE_CONTEXT = "/ctx-news-services.xml";

	private static final String BUSINESS_CONTEXT = "/ctx-news-business.xml";

	private static final String FACTORY_CONTEXT = "/ctx-news-factory.xml";

	private static final String DATABASE_CONTEXT = "/ctx-news-database.xml";

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				SERVICE_CONTEXT, BUSINESS_CONTEXT, FACTORY_CONTEXT,
				DATABASE_CONTEXT);

		IFacturyDistribution facturyDistribution = context
				.getBean(IFacturyDistribution.class);

		facturyDistribution.startApplication();
	}

}
